<%@page import="com.zhuoshi.bean.PurchaseBean"%>
<%@page import="com.zhuoshi.dao.PurchaseDao"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
request.setCharacterEncoding("UTF-8");
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

PurchaseDao dao = new PurchaseDao();
List<PurchaseBean> list = dao.getList();
pageContext.setAttribute("list", list);

%>

<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta http-equiv="Cache-Control" content="no-siteapp">
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="template/H-ui.min.css">
<link rel="stylesheet" type="text/css" href="template/H-ui.admin.css">
<link rel="stylesheet" type="text/css" href="template/iconfont.css">
<link rel="stylesheet" type="text/css" href="template/icheck.css">
<link rel="stylesheet" type="text/css" href="template/skin.css" id="skin">
<link rel="stylesheet" type="text/css" href="template/style.css">
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>采购合同管理</title>
<link rel="stylesheet" href="template/layer.css" id="layui_layer_skinlayercss">
<link href="template/WdatePicker.css" rel="stylesheet" type="text/css"></head>
<body>

<!--  	<form name="form2" action="delpurchase" method="post" id="form2">
		<input type="hidden" name="id" id="id" />
	</form>
-->
	<nav class="breadcrumb">
		<i class="Hui-iconfont"></i> 首页 <span class="c-gray en">&gt;</span>
		系统管理 <span class="c-gray en">&gt;</span> 采购管理
	</nav>
	<div class="page-container">
		<form action="http://localhost:8080/EMIS/purchasesearch" id="form" method="post">
			<div class="text-c">日期范围：
			    <input type="text" name="start" onFocus="WdatePicker({maxDate:&#39;#F{$dp.$D(\&#39;datemax\&#39;)||\&#39;%y-%M-%d\&#39;}&#39;})" id="datemin" class="input-text Wdate" style="width:120px;">
		        -
		        <input type="text" name="end" onFocus="WdatePicker({minDate:&#39;#F{$dp.$D(\&#39;datemin\&#39;)}&#39;,maxDate:&#39;%y-%M-%d&#39;})" id="datemax" class="input-text Wdate" style="width:120px;">&nbsp;
				<input type="text" class="input-text" style="width:120px" placeholder="合同数字编号" id="" name="contractnum">
				<input type="text" class="input-text" style="width:120px" placeholder="备件名称" id="" name="spare">	
				<input type="text" class="input-text" style="width:120px" placeholder="规格型号" id="" name="model">	
				<input type="text" class="input-text" style="width:120px" placeholder="供货商名称" id="" name="supplier">	
				<button type="submit" class="btn btn-success radius" id="" name="">
					<i class="Hui-iconfont"></i> 搜采购合同
				</button>
			</div>
		</form>
		<div class="cl pd-5 bg-1 bk-gray mt-20">
		
			<span class="l"> <a class="btn btn-primary radius" onClick="system_category_add(&#39;添加采购合同&#39;,&#39;purchas_add.jsp&#39;)" href="javascript:;"><i class="Hui-iconfont"></i> 添加采购合同</a></span>
			
		
		</div>
		<div class="mt-20">

			<div id="DataTables_Table_0_wrapper" class="dataTables_wrapper no-footer"><div class="dataTables_length" id="DataTables_Table_0_length"><label>显示 <select name="DataTables_Table_0_length" aria-controls="DataTables_Table_0" class="select"><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select> 条</label></div><div id="DataTables_Table_0_filter" class="dataTables_filter"><label>从当前数据中检索:<input type="search" class="input-text " aria-controls="DataTables_Table_0"></label></div><table class="table table-border table-bordered table-hover table-bg table-sort dataTable no-footer" id="DataTables_Table_0" role="grid" aria-describedby="DataTables_Table_0_info">
				<thead>
	<tr class="text-c" role="row">
	<th class="sorting_disabled" rowspan="1" colspan="1" aria-label="排序" style="width: 34px;">排序</th>
	<th class="sorting_desc" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-sort="descending" aria-label="合同数字编号: 升序排列" style="width: 96px;">合同数字编号</th>
	<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="备件名称: 升序排列" style="width: 65px;">备件名称</th>
	<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="规格型号: 升序排列" style="width: 67px;">规格型号</th>
	<th class="sorting_disabled" rowspan="1" colspan="1" aria-label="计量单位" style="width: 65px;">计量单位</th>
	<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="数量: 升序排列" style="width: 34px;">数量</th>
	<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="单价: 升序排列" style="width: 40px;">单价</th>
	<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="合同总额: 升序排列" style="width: 66px;">合同总额</th>
	<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="供货商名称: 升序排列" style="width: 205px;">供货商名称</th>
	<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="采购时间: 升序排列" style="width: 83px;">采购时间</th>
	<th class="sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="操作: 升序排列" style="width: 43px;">操作</th>
	</tr>
				</thead>
				<tbody>
				
					
						
					
						
					
						
					
						
					
						
				<c:forEach items="${list }" var="bean">
				<tr class="text-c odd" role="row">
						
                            <td>${bean.id }</td>
							<td class="sorting_1">${bean.numerical }</td>
							<td>${bean.sqarename }</td>
							<td>${bean.modeltype }</td>
							<td>${bean.unit }</td>
							<td>${bean.totalcount }</td>
							<td>${bean.price }</td>
							<td>${bean.totalmoney }</td>
							<td>${bean.supplier }</td>
							<td>${bean.purchasedate }</td>
							<td class="f-14"><a title="编辑" href="javascript:;" onClick="system_category_edit(&#39;修改采购合同&#39;,&#39;purchase_update.jsp?id=${bean.id}&#39;,&#39;1&#39;,&#39;800&#39;,&#39;480&#39;)" style="text-decoration:none"><i class="Hui-iconfont"></i></a>
								<a title="删除" href="purchase_del_successed.jsp?id=${bean.id}"  style="text-decoration:none"><i class="Hui-iconfont"></i></a>
							</td>
						</tr>
						</c:forEach>

						
						</tbody>
			</table>
			<div class="dataTables_info" id="DataTables_Table_0_info" role="status" aria-live="polite">显示 1 到 5 ，共 5 条</div>
			<div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
			<a class="paginate_button previous disabled" aria-controls="DataTables_Table_0" data-dt-idx="0" tabindex="0" id="DataTables_Table_0_previous">上一页</a>
			<span>
			<a class="paginate_button current" aria-controls="DataTables_Table_0" data-dt-idx="1" tabindex="0">1</a>
			</span>
			<a class="paginate_button next disabled" aria-controls="DataTables_Table_0" data-dt-idx="2" tabindex="0" id="DataTables_Table_0_next">下一页</a>
			</div>
			</div>
			
		
		</div>
	</div>
	<footer class="footer mt-20">
	<div class="container">
		Copyright ©       本后台系统由KEG提供技术支持
	</div>
    </footer>
	<script type="text/javascript" src="template/jquery.min.js"></script>
	<script type="text/javascript" src="template/layer.js"></script>
	<script type="text/javascript" src="template/laypage.js"></script>
	<script type="text/javascript" src="template/WdatePicker.js"></script>
	<script type="text/javascript" src="template/jquery.dataTables.min.js"></script>
	<script type="text/javascript" src="template/H-ui.js"></script>
	<a href="javascript:void(0)" class="Hui-iconfont toTop" title="返回顶部" alt="返回顶部" style="display:none"></a>
	<script type="text/javascript" src="template/H-ui.admin.js"></script>
	<script type="text/javascript">
		$('.table-sort').dataTable({
			"aaSorting" : [ [ 1, "desc" ] ],//默认第几个排序
			"bStateSave" : true,//状态保存
			"aoColumnDefs" : [
			//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
			{
				"orderable" : false,
				"aTargets" : [ 0, 4 ]
			} // 制定列不参与排序
			]
		});
		/*系统-栏目-添加*/
		function system_category_add(title, url, w, h) {
			layer_show(title, url, w, h);
		}
		/*系统-栏目-编辑*/
		function system_category_edit(title, url, id, w, h) {
			layer_show(title, url, w, h);
		}
		/*系统-栏目-删除*/
		function system_caigou_del(title, url, id, w, h) {
			layer_show(title, url, w, h);
			//layer.confirm('确认要删除吗？', function(index) {
				//$(obj).parents("tr").remove();
				//document.getElementById("id").value = id;
				//document.form2.submit();
				//layer.msg('已删除!', {
					//icon : 1,
					//time : 1000
				//});function system_category_edit(title, url, id, w, h)
			//});
		}
	</script>




</body></html>